local HurtStrategy = require("gameLogic.fight.fightHurtStrategy.HurtStrategy")
local HurtSuckBlood = class("HurtSuckBlood", HurtStrategy)
local Hurt = require("gameLogic.fight.fightHurtStrategy.Hurt")

-- 吸血
function HurtSuckBlood:ctor(config, skill, hurtStrategy)
    HurtSuckBlood.super.ctor(self, config, skill)
    self._hurtStrategy = hurtStrategy
end

function HurtSuckBlood:hurt(target)
    local hurt = self._hurtStrategy:hurt(target)
    local suckValue = math.floor(hurt.value * self._config.suck_blood)
    hurt:setSuckBlood(suckValue)
    return hurt
end

return HurtSuckBlood
